package com.woniu.service;

import com.woniu.dao.Admins;
import com.woniu.dao.ManagerDao;

import java.util.List;

/**
 * @author WenXin
 * @version 1.0
 * @description: TODO
 * @date 2022/8/19 18:57
 */
public class RbacManagerServiceImpl implements RbacManagerService {
    private ManagerDao dao;

    public void setDao(ManagerDao dao) {
        this.dao = dao;
    }

    //查询所有admin账号的方法
    @Override
    public List<Admins> findAllAdmins() {
        return dao.findAll();
    }

    @Override
    public int insertAdmin(String user, String pwd) {
        return dao.insertAdmin(user, pwd);
    }

    @Override
    public int updateAdmin(Admins admin) {
        return dao.updateAdmin(admin);
    }

    @Override
    public int deleteAdmin(int id) {
        return dao.deleteAdmin(id);
    }
}
